package com.shop2cn.iapi.productcategory.testcase;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.shop2cn.iapi.productcategory.parameter.CallSyncMongoBean;
import com.shop2cn.iapi.productcategory.service.CallSyncMongoCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.*;
import com.ymt.utils.tag.*;
/**
*神器品牌同步回调接口Test
*FreeMaker Template自动生成代码
*/
@TestSuite
public class Ts_CallSyncMongo{
	private static CallSyncMongoBean callsyncmongoBean;
	private static CallSyncMongoCall callsyncmongoCall;
	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("神器品牌同步回调接口Test");
	}

	@Before
	public void caseUp() {
		callsyncmongoBean=new CallSyncMongoBean();
		callsyncmongoCall=new CallSyncMongoCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(callsyncmongoCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}
	
	
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_CallSyncMongo_001() {
		Logger.start(true,"正确数据，成功");
		try {
			
			callsyncmongoBean.setBrandId(1);
			callsyncmongoCall.setData(callsyncmongoBean);
			callsyncmongoCall.callService();			
			Logger.verifyEquals("200", callsyncmongoCall.getString("code"), "验证code");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}